<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <h1>支付成功页面将在<span>10</span>s后跳转, <a href="./05-location属性.html">单击这里立即跳转</a></h1>
<script>
  var  time = 10
  var sp = document.getElementsByTagName('span');
  var index = setInterval(function (){
      sp[0].innerText = time
      time--
      if (time < 0){
          clearInterval(index)
          location.href = './05-location属性.html'
      }
  },1000)



</script>
</body>
</html>